home *** CD-ROM | disk | FTP | other *** search
/ Eagles Nest BBS 1 / Eagles_Nest_Mac_Collection_Disc_1.TOAST / Scripting & Apple Events / RoboFinder13 / RoboFinder 1.3.rsrc / TEXT_128.txt < prev    next >
Text File  |  1993-07-26  |  33KB  |  427 lines

  1. (Use Save Help As... in the Help menu to save this info as a TeachText document)
  2.  
  3.  
  4. ROBOFINDER 1.3
  5.  
  6. Copyright ¬©1993 by Alex Benenson. All rights reserved.
  7. CompuServe ID: 100112,3430
  8. Internet: 100112.3430@compuserve.com
  9.  
  10. RoboFinder is good enough to be shareware, but I am not prepared to provide the amount of support that I think paying customers deserve (although I will certainly try to help if you have problems). So it‚Äôs freeware, but with a catch: you don‚Äôt pay me anything, but if you like RoboFinder and use it often, please show your appreciation by giving a donation to your favorite charity.
  11.  
  12. RoboFinder may be freeware, but it is not public domain. It may not be altered in any way. No fee (other than standard downloading fees) may be charged for the distribution of RoboFinder. It may not be distributed with other software on physical media without permission.
  13.  
  14. RoboFinder is provided ‚Äúas-is‚Äù without warranty of any kind. The author is not responsible for any problems that may result from the use of this program. Careless use of RoboFinder can result in data loss. Be very sure that it works correctly in your system before you entrust it with valuable data.
  15.  
  16.  
  17. UPGRADING?
  18.  
  19. If you are upgrading from an earlier version of RoboFinder, see the VERSION HISTORY section at the end of this document for important information on bug fixes, changes, and enhancements.
  20.  
  21.  
  22. WHAT IS IT?
  23.  
  24. RoboFinder is a script-driven ‚Äòbatch‚Äô utility for automating many file management tasks. With RoboFinder, you can write scripts containing simple english-like commands that:
  25. ‚Ä¢ Search for, copy, move, rename, trash and erase files and folders
  26. ‚Ä¢ Branch and loop based on user input or existence of particular items
  27. ‚Ä¢ Treat aliases as real files or as alias records
  28. ‚Ä¢ Interface easily and usefully with QuicKeys‚Ñ¢
  29.  
  30. Ideal uses for RoboFinder include any file management task you need to perform frequently:
  31. ‚Ä¢ Loading a RAM disk with your favorite files
  32. ‚Ä¢ Doing ‚Äòquick and dirty‚Äô backups
  33. ‚Ä¢ Collecting files of a particular type in a particular location
  34. ‚Ä¢ Erasing leftover items created by untidy applications
  35.  
  36. RoboFinder only works with System 7.0 or later.
  37.  
  38.  
  39. SCRIPT FILES
  40.  
  41. Since RoboFinder doesn‚Äôt include text editing capabilities, you must use a text editing application, such as TeachText, to create and modify scripts. RoboFinder will open any document of type TEXT; this is TeachText‚Äôs standard format.
  42.  
  43. When you open a text file using RoboFinder's Open & Run‚Ķ command (instead of opening from the Finder), you will have the opportunity to change the file into a RoboFinder document. To edit a script after it has been converted to a RoboFinder document, either open it from within a text editor (like TeachText), or put the text editor (or an alias of it) on the desktop and drag scripts into it.
  44.  
  45. The script file format is straightforward: one command per line, maximum 255 characters each line. Spaces and tabs at the beginning of a line are ignored, so commands may be indented. A maximum of 20 command names, parameters, and keywords are permitted per line; extra items are ignored.
  46.  
  47. Blank lines are ignored, as are lines that start with any punctuation character (except a colon).
  48.  
  49.  
  50. SCRIPT EXECUTION
  51.  
  52. You can run scripts from the Finder or open them from within RoboFinder. If you select multiple scripts in the Finder and open them together, they will be executed in alphabetical order.
  53.  
  54. As soon as you open a script it starts running. If Show Commands is checked, a script window appears which shows the commands as they are executed.
  55.  
  56. You can check Quit When Done to have RoboFinder quit after all scripts have finished executing. If an error dialog appears when Quit When Done is checked, RoboFinder will automatically quit after 30 seconds without user activity.
  57.  
  58. To stop execution of a script, press Command-Period.
  59.  
  60. Settings and variables are preserved until you quit RoboFinder, so it is possible to run multiple scripts in one session that depend on previous scripts.
  61.  
  62. If the script window doesn't appear even when Show Commands is checked, quit, throw away the RoboFinder Prefs file (in the Preferences folder) and run RoboFinder again.
  63.  
  64.  
  65. PATHNAMES AND DEFAULT FOLDERS
  66.  
  67. Most RoboFinder commands take pathnames as parameters. A pathname is a list of the names of disks and folders that lead to a particular item, separated by colons. For example, if you have a disk "HD20" with a folder "Current Work" in it, with a document "Baker Account" in that folder, the full pathname to the document would be "HD20:Current Work:Baker Account".
  68.  
  69. RoboFinder lets you set up a default folder, so that you don‚Äôt have to use full pathnames if you are doing a lot of things in the same folder. For instance, continuing with the above example, if you also had a document "Phone List" in the "Current Work" folder, you could use the SETFOLDER command to set the default folder to "HD20:Current Work" and then refer to the documents by their names only, "Baker Account" and "Phone List", without having to include the disk and folder names too.
  70.  
  71. You can also use the FINDFILE and FINDFOLDER commands to set the default folder (several other commands also change the default folder. This is noted where applicable). These commands search for a matching item. So, once again continuing from the above example, the command FINDFOLDER "Current Work" would do the same thing as the command SETFOLDER "HD20:Current Work".
  72.  
  73. While a default folder is defined, you can still use a full pathname to refer to an item in another location. If no default folder is defined, you must always use full pathnames. If you don‚Äôt put a disk name at the beginning of a pathname, RoboFinder will look for the item on the startup disk.
  74.  
  75.  
  76. FLOPPY DISKS
  77.  
  78. You may use FLOPPY, FLOPPY1, and FLOPPY2, instead of the name of the disk, if you want to refer to a disk in a floppy drive (case is ignored; FLOPPY and floppy are equivalent). FLOPPY and FLOPPY1 refer to the internal drive; FLOPPY2 accesses the second/external floppy drive. This option is useful in scripts that need to access a floppy drive without knowing the name of the disk in the drive. For example, to create a new folder called Backup on the disk in the internal floppy drive, you could use the command NEWFOLDER "FLOPPY:BACKUP"; this would work no matter what the name of the floppy disk was.
  79.  
  80.  
  81. THE DESKTOP FOLDER AND OTHER INVISIBLE ITEMS
  82.  
  83. Files or folders (not disks or the trash) that are out on the desktop are stored in an invisible folder called the ‚ÄúDesktop Folder‚Äù; there is one for each disk. If you want to access these items in your scripts, make sure you look for them in this folder. For example, if a file called "calendar" is on the desktop of the disk "HD20", refer to it in your script as "HD20:Desktop Folder:calendar", not "HD20:calendar".
  84.  
  85. RoboFinder allows you to access invisible items just like any others; you just have to know where to find them. The standard open file dialog (accessed with the commands GETFILE or GETFOLDER) will show invisible files, but it won‚Äôt show special System 7 invisible folders (such as the Desktop Folder).
  86.  
  87.  
  88. VARIABLES
  89.  
  90. RoboFinder supports two kinds of variables: user and system. Both can be used as parameters for most commands. A variable name is a string starting with an exclamation point; the string can be up to 31 characters long and can contain any printable characters (except a colon). Case is ignored (i.e. the variable names !FILE and !file are equivalent).
  91.  
  92. System variables contain the results of past commands and usually have the same name as the command that changes them (e.g. the !FINDFILE variable contains the pathname of the file found by the last FINDFILE command). Some system variables can be changed by more than one command, this is noted in the command descriptions where applicable. RoboFinder uses these system variables: !ERROR, !FINDFILE, !FINDFOLDER,!GETFILE, !GETFOLDER, !GETNAME, !GETNEWFILE, and !SETFOLDER (there is also a short form for each that is the same as the short form of the corresponding command; see the command descriptions).
  93.  
  94. User variables are set and changed by SET and CLEAR commands (you can also clear system variables). A user variable can be set to a text string or to the value of another variable.
  95.  
  96. The values of variables are preserved until RoboFinder quits; scripts can refer to variables set by other scripts that ran earlier. See the COMMANDS AND PARAMETERS section for information on using variables with commands.
  97.  
  98.  
  99. ERRORS
  100.  
  101. Causes of errors fall into two broad areas: those caused by mistakes in your script (e.g. a missing keyword), and system problems (e.g. a file referred to in the script can‚Äôt be found). RoboFinder can report over 50 descriptive error messages.
  102.  
  103. There are three levels of error severity: silent, which do not show a message, but are detectable in your script; normal, which cause a message to appear; and fatal, which force RoboFinder to quit. Silent errors occur when no matching items can be found in a search, or when a dialog box is cancelled. Fatal errors are caused by unexpected and unrecoverable internal problems.
  104.  
  105. If a command causes an error, the error message appears in the script window, and (depending on the settings), a dialog box also appears showing the error, and gives you the option of continuing or canceling execution. If execution of more scripts is pending, you have the option of cancelling their execution.
  106.  
  107. You can process errors in your script with the following commands:
  108. ‚Äî To control how errors are handled: see IGNOREERRORS
  109. ‚Äî To detect an error: see IF
  110. ‚Äî To clear the error status: see CLEAR
  111. ‚Äî To access the error message: use the !ERROR system variable
  112.  
  113.  
  114. COMMANDS AND PARAMETERS
  115.  
  116. Commands, parameters, and keywords can be uppercase or lowercase or mixed; case only matters when giving the names of new items. In the command descriptions below, commands and keywords are shown in uppercase and examples (indicated by a ‚óä character) are shown in mixed or lower case.
  117.  
  118. Most commands have shorthand versions. These are indicated with a slash; for example COPY/CP means that the shorthand form of COPY is CP.
  119.  
  120. Parameter types:
  121. ‚Äî <command> = RoboFinder command
  122. ‚Äî <condition> = condition tested by IF command
  123. ‚Äî <file> = file pathname (can be a variable)
  124. ‚Äî <folder> = folder pathname (can be a variable)
  125. ‚Äî <item> = file or folder pathname (can be a variable)
  126. ‚Äî <name> = text without colons or spaces, maximum 31 characters (can be a variable)
  127. ‚Äî <number> = a string of digits
  128. ‚Äî <signature> = 4-character Macintosh file type/creator signature
  129. ‚Äî <text> = any text (can be a variable)
  130. ‚Äî <variable> = user variable (text preceded by a ‚Äò!‚Äô character)
  131.  
  132. Keywords and modifiers (for example ON, OFF, EXACT, LOCAL, etc.) do not have shorthand forms. Keywords and modifiers that cannot be used together are separated by a bar character: ON | OFF. Optional items are shown below in square brackets.
  133.  
  134. If a parameter includes spaces or tabs, enclose it in double quotes: "System Folder", "Insert next disk, then click OK".
  135.  
  136.  
  137. COMMANDS
  138.  
  139. BEEP/BP
  140. ‚Äî Plays the current system beep sound.
  141.  
  142. CLEAR/CLR <variable>
  143. ‚Äî Clears the value of a user or system variable. See the VARIABLES section for more information.
  144. ‚Äî If you refer to a cleared (or undefined) variable you will get an error.
  145. ‚Äî To set the value of a user variable, use SET.
  146. ‚óä clear !appfolder ‚Äî erases value of !appfolder user variable
  147. ‚óä clr !findfile ‚Äî erases value of !findfile system variable
  148. ‚óä clear !error - clear error status
  149.  
  150. COPY/CP <item> [TO] <item> [REPLACE | ADD | SHOW]
  151. ‚Äî Copies files and folders.
  152. ‚Äî Unless you use ADD or REPLACE, if an item with the same name already exists in the destination, an error will occur. Use the REPLACE modifier to overwrite the item, or use ADD to keep the original item and make a copy of the new item called ‚Äò<item> copy‚Äô. If an item called ‚Äò<item> copy‚Äô exists, a digit will be appended after ‚Äòcopy‚Äô.
  153. ‚Äî REPLACE is not available when copying folders. To replace a folder, TRASH it first.
  154. ‚Äî Use the SHOW modifier to show the progress of a folder copy (ignored when copying single files).
  155. ‚Äî The TO keyword is optional, it is available to improve readability.
  156. ‚Äî If there isn‚Äôt enough space to copy the item, the copy will not take place, and an error will occur.
  157. ‚óä Copy "HD20:Docs:party invite" Zippy:Backups ‚Äî copy to folder
  158. ‚óä cp "Fax:Phone List" to "Fax:Phone List backup" replace ‚Äî copy to new file, overwrite existing file
  159. ‚óä copy "Pollux:Current work Δí" "Castor:Backups" ‚Äî copy Current work Δí folder into Backups folder
  160.  
  161. DELETE/DEL/ERASE <file>
  162. ‚Äî Deletes a file immediately; does not put it in the trash. For safer operation, and to remove entire folders, use TRASH instead.
  163. ‚Äî If the file was accessed through an alias, the alias will be deleted too.
  164. ‚óä Delete "My Picture"
  165.  
  166. END
  167. ‚ÄîStop the current script and start the next one (if more than one script was opened).
  168.  
  169. FINDAGAIN/FA
  170. ‚Äî Finds the next item that matches the search criteria from the last FINDFILE or FINDFOLDER.
  171. ‚Äî The matching item will be available in the !FINDFILE or !FINDFOLDER variable, depending on which command was used to start the search.
  172. ‚Äî If no matching item is found, a silent error will occur.
  173. ‚óä findfile "report" ‚Äî copy all items matching "report" to floppy disk
  174.    :loop
  175.    if error then end
  176.    copy !findfile "floppy"
  177.    findagain
  178.    goto loop
  179.  
  180. FINDFILE/FF <name> [EXACT | STARTS] [STARTUP | LOCAL] [TYPE <signature>] [CREATOR <signature>] [NEWEST | OLDEST | LARGEST | SMALLEST]
  181. ‚Äî Searches disks for a matching file, and sets the default folder to the folder containing the file. If no matching file is found, the default folder is not changed, and a silent error occurs.
  182. ‚Äî Use the EXACT or STARTS modifiers to look for an exact file name match or for a file that starts with the name. The default is to look for a match anywhere within the file name.
  183. ‚Äî Use the STARTUP modifier to only search the startup disk; use the LOCAL modifier to only search local disks ‚Äì network disks will not be searched. The default is to search all disks.
  184. ‚Äî Use the TYPE and CREATOR modifiers to search for files with the indicated type and/or creator signature (if the signature includes one or more spaces, enclose it in double quotes).
  185. ‚Äî Use the NEWEST or OLDEST or LARGEST or SMALLEST modifiers to look for the newest or oldest, or largest or smallest matching file out of all the files that match the name.
  186. ‚Äî After a successful search, you can use the variable !FINDFILE or !FF to refer to the found file. For example, if you use FINDFILE followed by DELETE !FINDFILE, the found file will be erased.
  187. ‚Äî FINDFILE will not search a pathname, only a file name (i.e. no colons allowed). You cannot search a specific folder, only an entire disk. This is the same as the Finder‚Äôs Find‚Ķ command.
  188. ‚Äî See SETFOLDER for more information on using default folders.
  189. ‚óä FindFile letter starts ‚Äî finds the first file with a name starting with the text "letter"
  190. ‚óä FF "letter to john may 8" exact ‚Äî find this file
  191. ‚óä FF temp exact largest startup ‚Äî search the startup disk only for the largest file named "temp"
  192. ‚óä FF "MacWrite" type APPL ‚Äî find the MacWrite application
  193.  
  194. FINDFOLDER/FFO <name> [EXACT | STARTS] [STARTUP | LOCAL]
  195. ‚Äî Like FINDFILE, but searches for folders and sets the default folder to the first matching folder found.
  196. ‚Äî Use of modifiers besides those shown above is not supported.
  197. ‚Äî After a successful search, you can use the variable !FINDFOLDER or !FFO to refer to the found folder in later commands.
  198. ‚óä FindFolder docs‚Äî finds the first folder who‚Äôs name contains the text "docs"
  199.  
  200. GETFILE/GF <text> [<signature>] [<signature>] [<signature>] [<signature>]
  201. ‚Äî Allows the user to select a file with the standard open file dialog box. The text is used for the prompt in the dialog box.
  202. ‚Äî You may include up to four file type signatures after the prompt text; only files of the indicated type will be listed in the open file dialog. The default is to list all files, even invisible ones.
  203. ‚Äî After using GETFILE, use the variable !GETFILE or !GF to refer to the selected file in later commands.
  204. ‚Äî The default folder (see SETFOLDER) is set to the folder containing the selected file.
  205. ‚Äî If the user clicks Cancel, a silent error occurs.
  206. ‚Äî NOTE: If an alias is selected, it will be resolved regardless of the RESOLVEALIASES setting.
  207. ‚óä GetFile "Select an application or text file:" TEXT APPL ‚Äî List applications and text files
  208. ‚óä GetFile "File to trash?" ‚Äî Prompt user to select a file
  209. ¬† If not Error then Trash !getfile ‚Äî trash the file the user selected
  210.  
  211. GETFOLDER/GFO <text>
  212. ‚Äî Like GETFILE, but‚Ķ
  213. ‚Äî Selects a folder instead of a file.
  214. ‚Äî Use the variable !GETFOLDER or !GFO to refer to the selected folder in later commands.
  215. ‚Äî The default folder (see SETFOLDER) is set to the selected folder.
  216. ‚óä GetFolder "Destination for letters?" ‚Äî Prompt user to select a folder
  217. ¬† If not Error then Move letters !GetFolder ‚Äî move item to selected folder
  218.  
  219. GETNAME/GN <text> [<name>]
  220. ‚Äî Allows the user to enter text to be used by later commands that require a <name> parameter.
  221. ‚Äî Shows a dialog with a text entry area and OK and Cancel buttons. If the user clicks Cancel, a silent error occurs.
  222. ‚Äî The initial value of the name is optional, if omitted, the initial name is ‚ÄòUntitled‚Äô.
  223. ‚Äî Use the variable !GETNAME or !GN to refer to the name in later commands that take a <name> parameter (FINDFILE, FINDFOLDER, GETNEWFILE, and RENAME)
  224. ‚Äî Names containing colon characters or names longer than 31 characters are not accepted.
  225. ‚óä GetName "Rename file as:" ‚Äî Prompt user to select a folder
  226. ¬† If not Error then rename temp !getname ‚Äî rename file
  227.  
  228. GETNEWFILE/GNF <text> [<name>]
  229. ‚Äî Like GETFILE, but‚Ķ
  230. ‚Äî Shows the standard dialog box to save a new file (this does not create the file; it only defines a new file name in a specific location that can be used as a destination by later commands).
  231. ‚Äî The initial value of the new file name is optional; if omitted, the initial name is ‚ÄòUntitled‚Äô.
  232. ‚Äî Use the variable !GETNEWFILE or !GNF to refer to the new file in later commands.
  233. ‚Äî The default folder (see SETFOLDER) is set to the parent folder of the new file.
  234. ‚óä GetNewFile "File to copy to?" ‚Äî Prompt user to select a file
  235. ¬† If not Error then Copy "Recipes" !GetNewFile ‚Äî copy existing file to the new file
  236.  
  237. GOTO/GO <name>
  238. ‚Äî Branches execution to the label specified. See LABEL.
  239. ‚óä Goto Loop ‚Äî jump to line LABEL LOOP (or :LOOP)
  240.  
  241. IF [NOT] <condition> [THEN] <command> [ELSE <command>]
  242. ‚Äî A general testing and decision command; <condition> can be one of the following:
  243. ‚Ä¢ !ERROR/!ERR/ERROR/ERR ‚Äî If an error occurred earlier during the execution of the script, the condition is set to true (and the error status is cleared). The exclamation point is optional.
  244. ‚Ä¢ EXISTS/EX <item>  ‚Äî If the item exists, the condition is set to true.
  245. ‚Ä¢ CONFIRM/CNF <text> ‚Äî Shows a dialog box containing the message text with OK and Cancel buttons. If OK is clicked, the condition is set to true.
  246. ‚Ä¢ DECIDE/DCD <text> ‚Äî Shows a dialog box containing the message text with Yes and No buttons. If Yes is clicked, the condition is set to true.
  247. ‚Äî Precede <condition> with NOT to negate it.
  248. ‚Äî The THEN keyword is optional, it is available to improve readability.
  249. ‚Äî Only one IF per line allowed.
  250. ‚óä If not error then goto continue
  251. ‚óä If not exists !FindFile prompt "File does not exist" else goto copy
  252. ‚óä If confirm "Trash Temp Folder?" then trash "Temp Folder"
  253. ‚óä If decide "Copy Files?" then goto copyfiles else end
  254.  
  255. IGNOREERRORS/IE ON | OFF
  256. ‚Äî When turned off (default), if an error occurs, the error message will appear in a dialog box with the option of continuing or canceling execution of the script. When turned on, error messages will be listed in the script window (if it is visible) and script execution will continue.
  257. ‚Äî The last value of this setting will be used the next time you run RoboFinder.
  258. ‚Äî This setting does not affect the error status checked by IF ERROR.
  259.  
  260. LABEL/LB/: <name>
  261. ‚Äî Marks this line in the script as a destination for GOTO.
  262. ‚Äî DOS batch file-style labels (preceding the label name with a colon) are optional. Spaces between the colon and the label name are allowed and are ignored. If you use this style of label, note that the colon must be the first character in the line; it cannot be indented.
  263. ‚óä Label Loop ‚Äî GOTO Loop will come here 
  264. ‚óä : DoCopy ‚Äî GOTO DoCopy will come here 
  265.  
  266. MESSAGE/MSG [<text> | CLOSE]
  267. ‚Äî Displays a window containing text.
  268. ‚Äî To remove the window, use MESSAGE CLOSE.
  269. ‚Äî The message window is automatically closed when the current script stops executing.
  270. ‚óä message "Copying..." ‚Äî show message window
  271. ‚óä msg close ‚Äî remove message window
  272. ‚óä msg !error ‚Äî show last error message
  273.  
  274. MOVE/MV <item> <folder>
  275. ‚Äî Moves an item into a different folder. To move to a different disk, use COPY instead.
  276. ‚óä Move "HD20:Docs Folder:Letters Folder" "HD20:Old Docs Folder" ‚Äî move one folder into another
  277.  
  278. NEWFOLDER/NF <folder>
  279. ‚Äî Creates a new folder.
  280. ‚Äî If the folder already exists, a silent error will occur.
  281. ‚Äî The default folder (see SETFOLDER) is set to the new folder.
  282. ‚óä NF "HD20:Today's Items" ‚Äî make a new folder in HD20 called ‚ÄòToday's Items‚Äô
  283.  
  284. OPEN <file> [WITH <file> ] [WAIT]
  285. ‚Äî Opens documents and applications.
  286. ‚Äî If you give one parameter, it can be either a document or an application. If it is an application, it will be started; if it is a document, it will be opened by its creating application.
  287. ‚Äî If you give two parameters (separated by WITH), the first must be an application, and the second a document for it to open. This allows you to open a file with an application other than the one that created it (as long as the application can understand that type of document).
  288. ‚Äî Use the WAIT modifier to wait until the opened application quits; otherwise RoboFinder will continue script execution in the background after OPENing.
  289. ‚óä getfile "Select a text file:" TEXT  ‚Äî select a TEXT file
  290.     if not error open "apps:MacWrite" with !getfile ‚Äî open it with MacWrite, continue running script
  291. ‚óä open "docs:log file" wait ‚Äî open this document, wait until application quits, then continue script
  292.  
  293. PAUSE/PS <number>
  294. ‚Äî Pauses a given number of seconds before continuing script execution.
  295. ‚Äî To stop pausing before the time is up, press Command-Period.
  296.  
  297. PROMPT/PR <text>
  298. ‚Äî Puts up a dialog box with the message text and an OK button. Script execution continues when OK is clicked.
  299. ‚óä Prompt "Insert the backup disk and click OK..."
  300. ‚óä if !error then prompt !error ‚Äî show error message but allow script to continue
  301.  
  302. QUIT [ERROR]
  303. ‚Äî Quits RoboFinder immediately.
  304. ‚Äî Use the modifier ERROR after QUIT to return status to a calling QuicKeys sequence. This modifier is ignored if you are not running the script from QuicKeys. See QUICKEYS for more details.
  305. ‚óä quit ‚Äî just quit
  306. ‚óä if error then quit error ‚Äî quit and pass error status back to QuicKeys
  307.  
  308. QUITWHENDONE/QWD ON | OFF
  309. ‚Äî When turned off (default), RoboFinder does not quit when all scripts have finished. When turned on, RoboFinder quits as soon as all scripts have finished.
  310. ‚Äî The last value of this setting will be used the next time you run RoboFinder.
  311.  
  312. RENAME/RN <item> <name>
  313. ‚Äî Renames an item. The new name can‚Äôt contain any colons and must be less than 32 characters long.
  314. ‚óä rename "Zippy:Docs Folder" "Old Docs Folder"
  315. ‚óä RN "Zippy:Photos:President" "George"
  316.  
  317. RESOLVEALIASES/RA ON | OFF
  318. ‚Äî When turned on (default), commands operate on the file the alias points to; when turned off, the alias itself is the subject of later commands. For example, if RESOLVEALIASES is on, erasing an alias will also erase the file it points to; but if RESOLVEALIASES is off, only the alias will be erased.
  319. ‚Äî The last value of this setting will be used the next time you run RoboFinder.
  320. ‚Äî If you delete or trash items, turn off RESOLVEALIASES unless you have a good reason not to.
  321.  
  322. RUN <file>
  323. ‚Äî Ends the current script and starts another. 
  324. ‚Äî Variables and settings from the previous script will be retained.
  325. ‚Äî Execution of the original script does NOT continue after the new script ends.
  326.  
  327. SET <variable> [TO] <text/variable>
  328. ‚Äî Sets the value of a user variable. See the VARIABLES section for information on variables.
  329. ‚Äî The variable can be set to text or to the value of another user or system variable. If set to a variable, that variable must be initialized or an error will occur.
  330. ‚Äî The TO keyword is optional, it is available to improve readability.
  331. ‚Äî To erase a variable, use CLEAR.
  332. ‚óä set !appname !getfile ‚Äî set the variable !appname to the file the user selected
  333. ‚óä set !disk TO "Zeus" ‚Äî set the variable !disk to the text ‚ÄúZeus‚Äù
  334.  
  335. SETFOLDER/SF [<folder>]
  336. ‚Äî Sets or cancels the default folder, which must be specified as a full pathname (if you omit the disk name RoboFinder will assume that the folder is on the startup disk).
  337. ‚Äî To remove the default folder setting (and go back to using full pathnames), use SETFOLDER without any parameters.
  338. ‚Äî RoboFinder always starts with no default folder setting.
  339. ‚Äî SETFOLDER (and other commands that change RoboFinder‚Äôs default folder) doesn‚Äôt change the current default folder used by the rest of the system.
  340. ‚Äî The full pathname of the default folder is available in the !SETFOLDER/!SF system variable.
  341. ‚óä sf "System Folder" ‚Äî set default folder to system folder on startup disk
  342. ‚óä SetFolder "My Disk:System Folder:Preferences" ‚Äî set default folder exactly
  343. ‚óä setfolder ‚Äî cancel default folder setting
  344.  
  345. SHOWCOMMANDS/SC ON | OFF
  346. ‚Äî When turned on, commands are displayed in the script window as they are executed. When turned off (the default), the script window is hidden.
  347.  
  348. TEST <item/name>
  349. ‚Äî For debugging purposes. Displays information about the item. Shows full pathname, volume ID, parent directory ID, and whether item exists, is a folder, and/or is an alias.
  350. - If the script window is visible, the information will appear only in the script window. If it is hidden, the information will appear in a dialog box.
  351. ‚óä test !findfile ‚Äî see what FINDFILE found
  352. ‚óä test !gn ‚Äî see what was returned by GETNAME
  353.  
  354. TRASH/TR <item>
  355. ‚Äî Put an item (file or folder) into the trash. This is safer than using DELETE/ERASE.
  356. ‚Äî Trashing a disk will eject it and/or dismount it (same as when you drag a disk into the trash).
  357. ‚Äî If an item with the same name is already in the trash, the name of the newer item placed in the trash will have ‚Äòcopy‚Äô appended to it. If the name with ‚Äòcopy‚Äô appended is already in the trash, a digit will be appended after ‚Äòcopy‚Äô. This is the same behavior as the Finder.
  358.  
  359.  
  360. QUICKEYS
  361.  
  362. RoboFinder is particularly useful when used with QuicKeys. QuicKeys doesn‚Äôt include commands to manipulate files, and if you use it to record Finder operations, you must depend on items being where you expect them. Using RoboFinder to handle file manipulation is a lot more reliable ‚Äî and RoboFinder‚Äôs searching and branching capabilities make it more flexible.
  363.  
  364. To run a RoboFinder script from within a QuicKeys sequence, make sure that the script ends with the QUIT command. Then make a QuicKeys sequence containing a File QuicKey pointing to the script document, and a WindowWait‚Ñ¢ extension QuicKey configured to wait for a window with the title "RoboFinder" (the title is case sensitive, don't include the quotes); RoboFinder draws this window offscreen just before it quits. When you run the QuicKeys sequence, it will open RoboFinder with the script you selected, RoboFinder will execute the script, then quit, and then the QuicKeys sequence will continue.
  365.  
  366. For more control, RoboFinder can return status information to QuicKeys by using the QUIT ERROR option (see QUIT) combined with the ButtonAction‚Ñ¢ QuicKey extension. Write your RoboFinder script so that it calls QUIT if it is successful, but calls QUIT ERROR if it fails (which causes RoboFinder to add an ERROR button to its offscreen window). As above, set up the QuicKeys sequence to run the script, and call WindowWait to wait for the script to finish. After WindowWait, include a ButtonAction QuicKey that checks if the button ERROR does NOT exist (ERROR must be uppercase). Put the name of the QuicKey that runs the rest of the sequence in the ‚ÄòPass‚Äô field, and put the name of the error-handling QuicKey in the ‚ÄòFail‚Äô field. If you leave a field empty, instead of jumping to a different QuicKey, QuicKeys will just continue with the next item in the sequence after ButtonAction.
  367.  
  368.  
  369. KNOWN PROBLEMS AND ‚ÄòGOTCHAS‚Äô
  370.  
  371. ‚Ä¢ Background disk compression utilities
  372. ‚Äî These utilities fall into two categories: those that work at the file level (such as AutoDoubler‚Ñ¢), and those that work at the disk driver level (such as Times Two‚Ñ¢).
  373. ‚Äî File-level utilities can cause some problems with RoboFinder, mainly when the type or creator of files is involved (e.g. using TYPE or CREATOR with FINDFILE won‚Äôt find what you want). Other problems are possible as well. If in doubt, disable all extensions and try the script again.
  374.  
  375. ‚Ä¢ COPY (when copying a folder)
  376. ‚Äî The new folder icon doesn‚Äôt appear in the default position for a new icon (it appears slightly below and to the right of the position the source folder had in its parent window).
  377. ‚Äî SHOW display includes invisible items (usually custom ICON files).
  378.  
  379. ‚Ä¢ FINDAGAIN
  380. ‚Äî Searches only on the disk containing the item found by the last FIND... command.
  381. ‚Äî Won‚Äôt find more than 100 items that match the criteria from the the last FIND... command.
  382. ‚Äî Won‚Äôt find anything if you used one of the -EST keywords in the last FINDFILE.
  383.  
  384. ‚Ä¢ FINDFILE, FINDFOLDER
  385. ‚Äî It isn‚Äôt possible to search only a specific folder; the entire disk must be searched. This is why you can‚Äôt have a colon in the search name.
  386. ‚Äî If you use these commands to decide if an item does or doesn‚Äôt exist, be very sure you are giving as much information as possible to find the item you really want to find. Including the file type and creator is strongly recommended, as is use of the STARTS or EXACT modifiers.
  387.  
  388. ‚Ä¢ GETFILE, GETFOLDER
  389. ‚Äî If the user selects/opens an alias with these commands, it will be resolved regardless of the RESOLVEALIASES setting.
  390.  
  391. ‚Ä¢ OPEN
  392. ‚Äî If you are using an extension or control panel that re-maps what applications open particular types of files (such as Easy Open‚Ñ¢), a different application from the one RoboFinder expects may be opened; if so, RoboFinder may wait indefinitely (to stop waiting choose Stop from the File menu).
  393. ‚Äî Opening a non-Apple Event supporting application WITH a document is not reliable. System 7 will try to fool older applications into opening the document, but this doesn‚Äôt always work.
  394.  
  395. ‚Ä¢ TEST (when the parameter isn‚Äôt a file or folder)
  396. ‚Äî TEST will show a path, etc. for any parameter you pass it. This doesn‚Äôt make much sense if the parameter doesn‚Äôt point to a valid disk, file or folder.
  397.  
  398.  
  399. VERSION HISTORY
  400.  
  401. 1.3
  402. ‚Äî Fixed bug in GETFILE/FOLDER that caused a hang if RoboFinder was in the background.
  403. ‚Äî Fixed bug in GETFILE/FOLDER/NEWFILE that didn‚Äôt set default folder.
  404. ‚Äî Fixed bug that caused About‚Ķ to crash on Macs without color QuickDraw.
  405. ‚Äî New commands CLEAR, FINDAGAIN, SET.
  406. ‚Äî Enhancements to COPY, NEWFOLDER, TEST, TRASH.
  407. ‚Äî Added support for user variables (see VARIABLES).
  408. ‚Äî New system variables !ERROR and !SETFOLDER (see VARIABLES, ERRORS, SETFOLDER).
  409. ‚Äî FLOPPY[1/2] can substitute for names of disks in floppy drives (see FLOPPY DISKS).
  410. ‚Äî RoboFinder comes to the foreground before displaying dialog boxes and messages.
  411. ‚Äî Recompiled with THINK C 5.0.4 (earlier versions used 5.0.1).
  412.  
  413. 1.2
  414. ‚Äî Fixed bugs in FINDFILE/FOLDER that could find wrong item (or miss correct one).
  415. ‚Äî Fixed bug that caused spurious modification/virus errors. Checking is now safer, but more lenient.
  416. ‚Äî New commands OPEN, PAUSE, TEST.
  417. ‚Äî Error status available to calling QuicKeys sequence (see QUICKEYS and QUIT).
  418. ‚Äî DOS batch file-style line labels available (see LABEL).
  419. ‚Äî Hierarchical Open & Run... menu with Super Boomerang‚Ñ¢.
  420.  
  421. 1.1
  422. ‚Äî Fixed bug that caused IF NOT command to evaluate wrong.
  423. ‚Äî Fixed bug that caused spurious error messages with some non-Apple events.
  424. ‚Äî Fixed bug in QUIT that displayed ‚ÄòExecution cancelled by user‚Äô message.
  425.  
  426. 1.0
  427. ‚Äî First version.